﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace blackhouse.BlackApart.Web.Navigation {
    public class DefaultUrlReservationPageVisitor : UrlVisitor, IReservationPageVisitor {
        public void Apply(ReservationPage page) {
            switch (page.Type) {
                case ReservationSubpageType.Information:
                    this.Url = UrlUtils.LocalizeUrl("/pages/OnlineReservation.aspx?step=informacja");
                    break;
                case ReservationSubpageType.Contact:
                    this.Url = UrlUtils.LocalizeUrl("/pages/OnlineReservation.aspx?step=dane-kontaktowe&reservation=" + page.Reservation);
                    break;
                case ReservationSubpageType.AdditionalServices:
                    this.Url = UrlUtils.LocalizeUrl("/pages/OnlineReservation.aspx?step=uslugi-dodatkowe&reservation=" + page.Reservation);
                    break;
                case ReservationSubpageType.Payment:
                    this.Url = UrlUtils.LocalizeUrl("/pages/OnlineReservation.aspx?step=sposob-platnosci&reservation=" + page.Reservation);
                    break;
                default:
                    this.Url = UrlUtils.LocalizeUrl("/pages/OnlineReservation.aspx");
                    break;
            }
        }
    }
}